/* Comment does not exist in the original file*/

#include <stdio.h>
#define TEXTSIZE 20

int main(int argc, char* argv[]){
	FILE *f, *t;
	char c;
	int i;

	if (argc != 3){
		printf("Usage: %s <origen> <destino>\n", argv[0]);
		return (1);
	}

	if ((f = fopen(argv[1], "r")) == NULL) {
		printf("Error while opening the file %s\n", argv[1]);
		return (2);
	} 
	if ((t = fopen(argv[2], "w")) == NULL){
		printf("Error while opening the file %s\n", argv[2]);
		return (2);
	} else {
		while ((c = fgetc(f)) != EOF){
			if (fputc(c, t) != c){
				printf("Error while writing to the file: %s\n", argv[2]);
				return (3);
			}
		}
 		fputc('\n',f);
		printf ("File %s copied in %s\n", argv[1], argv[2]);
		fclose(f);
		fclose(t);
	}
}
